import request from '@/utils/request'

// 查询库存单位列表
export function listStockunit(query) {
  return request({
    url: '/store/stockunit/list',
    method: 'get',
    params: query
  })
}

// 查询库存单位详细
export function getStockunit(id) {
  return request({
    url: '/store/stockunit/' + id,
    method: 'get'
  })
}

// 新增库存单位
export function addStockunit(data) {
  return request({
    url: '/store/stockunit',
    method: 'post',
    data: data
  })
}

// 修改库存单位
export function updateStockunit(data) {
  return request({
    url: '/store/stockunit',
    method: 'put',
    data: data
  })
}

// 删除库存单位
export function delStockunit(id) {
  return request({
    url: '/store/stockunit/' + id,
    method: 'delete'
  })
}

// 导出库存单位
export function exportStockunit(query) {
  return request({
    url: '/store/stockunit/export',
    method: 'get',
    params: query
  })
}